var id= getvl("id");
	 
$(function(){
	  if(id!=''){
	  	  jinrtuijain(id);
	  }else{
	  	alert("传入值不能为空");
	  }
});
	
function jinrtuijain(id){
	    $.ajax({
        url:urlcore+"/api/autoRecommend/ensureById3?userid="+id,
			type: "get",
			dataType: 'json',
			contentType: "application/json;charset=utf-8",
			success: function(data) {
				if(data.success == true) {
					//alert(JSON.stringify(data.data))
					var myDate = new Date().pattern("yyyy-MM-dd");
					$("#jingtian").html(myDate);
					var da=data.data; 
	var shenyucishu='<div class="sell_jinri_cishu">剩余推荐次数'+
	'<em>'+da.amount+'</em>次<a href="21.2.0zengzhifuwu_tuijian.html">马上升级</a></div>';
				 $.each(da.autoRecommendList, function(y,n) {
				 	  var shangping='<div class="clearfix tuwen">'+
'    	<a href="#">'+
'	        <div class="tuwen-img fl">'+
'	            <img onerror="errorImg(this)" src="'+n.cover_url+'" width="75" height="75">'+
'	        </div>'+
'	        <div class="tuwen-wenzi">'+
'	            <h5 class="wuye_h01">'+n.goods_title+'</h5>'+
'	        </div>'+
'        </a>'+
'    </div>';
			     $("#shangping").append(shangping);	 	  
				 });
				  $("#shenyucishu").append(shenyucishu);	
				}
			},
			error: function() {
				alert("error");
			}
		});

	
}

